_ReminderList2Markdown
(
44
actions, 30 KB)
0 Get Dictionary from
[Shortcut Input]
»
2
3
5
7
37
1 Comment
@params: ────────────── • Required parameters: • listName (Text) • Optional parameters: • numberOfListItems (Number) • setAsCompleted (Boolean)
2 Find Reminders »
4
7
10
13
ContentItemFilter
:
• All the following are true List is
[0 Dictionary
.listName
]
Is Not Completed
3 If
[0 Dictionary
.numberOfListItems
]
has any value
4 Count Items in
[2 Reminders]
»
6
5 Get Numbers from
[0 Dictionary
.numberOfListItems
]
»
6 If
[5 Numbers]
<
[4 Count]
7 Get
Items in Range
1
to
[0 Dictionary
.numberOfListItems
]
from List
[2 Reminders]
»
8 Set Variable
myReminders
to
[7 Item from List]
9 Otherwise
10 Set Variable
myReminders
to
[2 Reminders]
11 End If
12 Otherwise ▵
3
13 Set Variable
myReminders
to
[2 Reminders]
14 End If
15 Repeat with Each in
[myReminders]
16 If
[Repeat Item
’s URL
]
has any value
17 If
[Repeat Item
’s Title
]
contains
[Repeat Item
’s URL
]
18 Text
*
[Repeat Item]
19 Otherwise
20 Text
* [
[Repeat Item]
](
[Repeat Item
’s URL
]
)
21 End If
22 Otherwise ▵
16
23 Text
*
[Repeat Item]
24 End If »
25 Set Variable
listItemTemp
to
[24 If Result]
26 If
[Repeat Item
’s Notes
]
has any value
27 Split Text
[Repeat Item
’s Notes
]
by New Lines »
28 Repeat[2] with Each in
[27 Split Text]
29 Text
➔ Tab
»
\u{tab}
30 Text »
[29 Tab]
[Repeat Item 2]
31 Add
[30 Text]
to Variable
listItemTemp
32 End Repeat[2] with Each
33 End If ▵
26
34 Combine Text
[listItemTemp]
with New Lines »
35 Add
[34 Combined Text]
to Variable
listItem
36 Set Variable
listItemTemp
to
37 Get Dictionary Value for
setAsCompleted
in
[0 Dictionary]
»
38 If
[37 Dictionary Value
as Boolean
]
is true
39
Set
Is Completed
of Reminder
[Repeat Item]
ReminderContentItemIsCompleted
:
1
40 End If
41 End Repeat with Each ▵
15
42 Combine Text
[listItem]
with New Lines
➔ markdownContent
»
43 Stop and Output
[42 markdownContent]